1. Field of the Invention
The invention relates to a method for bidirectional data transfer between a terminal and a smart card with a purse function. The invention also relates to a smart card capable of facilitating a bidirectional data transfer between a terminal and the smart card.
2. Description of the Related Art
DE 196 05 361 A1discloses a method for bidirectional data transfer between a terminal and a smart card in which amounts of money are written as transfer values to a balance-of-account memory of the smart card and stored therein. If a fault occurs during such a transaction, for example due to a power failure or due to the smart card being withdrawn from the terminal, the undesirable situation may be realized wherein the transfer value is only stored incompletely or after having been altered. Consequently, an incorrect transaction value would be stored, so that an incorrect balance of account would be assumed.
According to one embodiment of the invention, a method for bidirectional data transfer between a terminal and a smart card with a purse function is provided. A transfer value is written from the terminal to a balance-of-account memory of the smart card. A write-in control value (E) is written to a control memory at the latest together with the writing of the transfer value to the balance-of-account memory. The write-in control value (E) is erased as soon as the transfer value is completely stored in the balance-of-account memory.
According to another embodiment of the present invention, a smart card for bidirectional data transfer between a terminal and a smart card with a purse function, comprises at least one balance-of-account memory for storing a transfer value transmitted by the terminal, wherein the balance-of-account memory is assigned a control memory for storing a write-in control value (E), which can be altered in dependence on the presence of a fault, with the result that the transfer value stored in the balance-of-account memory is finally stored only if the control memory has assumed a writing confirmation state.
Further features of the invention form the subject matter of the claims and will be explained in more detail, in conjunction with further advantages of the invention, with reference to exemplary embodiments.